require 'siresta'

env = Siresta.env

desc 'environment'
task :environment do
  require './chat'
end

desc 'pry console'
task :console => :environment do
  require 'pry'
  binding.pry
end

desc 'JS client'
task :js do
  require 'siresta/clients/js'
  File.write 'html/chat.js', Siresta::Clients.js('ChatClient')
end

desc 'API routes'
task :routes => :environment do
  puts Siresta.routes.to_yaml
end
